/*
 * Copyright (c) 2010 Google Inc.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.google.api.data.gdata.v2.model;

import com.google.api.client.util.Key;

/**
 * A phone number associated with the containing entity (which is usually an
 * entity representing a person or a location).
 * 
 * @since 2.2
 * @author Nicolas Garnier
 */
public class PhoneNumber {

  public static final String REL_ASSISTANT = "http://schemas.google.com/g/2005#assistant";
  public static final String REL_CALLBACK = "http://schemas.google.com/g/2005#callback";
  public static final String REL_CAR = "http://schemas.google.com/g/2005#car";
  public static final String REL_COMPANY_MAIN = "http://schemas.google.com/g/2005#company_main";
  public static final String REL_FAX = "http://schemas.google.com/g/2005#fax";
  public static final String REL_HOME = "http://schemas.google.com/g/2005#home";
  public static final String REL_HOME_FAX = "http://schemas.google.com/g/2005#home_fax";
  public static final String REL_ISDN = "http://schemas.google.com/g/2005#isdn";
  public static final String REL_MAIN = "http://schemas.google.com/g/2005#main";
  public static final String REL_MOBILE = "http://schemas.google.com/g/2005#mobile";
  public static final String REL_OTHER_FAX = "http://schemas.google.com/g/2005#other_fax";
  public static final String REL_PAGER = "http://schemas.google.com/g/2005#pager";
  public static final String REL_RADIO = "http://schemas.google.com/g/2005#radio";
  public static final String REL_TELEX = "http://schemas.google.com/g/2005#telex";
  public static final String REL_TTY_TDD = "http://schemas.google.com/g/2005#tty_tdd";
  public static final String REL_WORK = "http://schemas.google.com/g/2005#work";
  public static final String REL_WORK_FAX = "http://schemas.google.com/g/2005#work_fax";
  public static final String REL_WORK_MOBILE = "http://schemas.google.com/g/2005#work_mobile";
  public static final String REL_WORK_PAGER = "http://schemas.google.com/g/2005#work_pager";
  /**
   * An email address that is neither one of the above. the label can be used to
   * indicate the actual type.
   */
  public static final String REL_OTHER = "http://schemas.google.com/g/2005#other";

  /** The phone number. */
  @Key("text()")
  public String number;

  /**
   * A programmatic value that identifies the type of email; see below for
   * details.
   */
  @Key("@rel")
  public String rel;

  /**
   * An optional "tel URI" used to represent the number in a formal way, useful
   * for programmatic access, such as a VoIP/PSTN bridge. See RFC 3966 for more
   * information on tel URIs.
   */
  @Key("@uri")
  public String uri;

  /**
   * When multiple email extensions appear in a contact kind, indicates which is
   * primary. At most one email may be primary. Default value is "false".
   */
  @Key("@primary")
  public Boolean primary;

  /**
   * A simple string value used to name this phone number. It allows UIs to
   * display a label such as "Work", "Personal", "Preferred", etc. if the
   * Relation is OTHER.
   */
  @Key("@label")
  public String label;
}
